<template>
  <a-modal
    :title="title"
    :visible="visible"
    :mask-closable="false"
    :body-style="{paddingBottom: '8px'}"
    :confirm-loading="submitLoading"
    @ok="handleSubmit"
    @cancel="handleClose"
  >
    <a-form
      :form="form"
      :label-col="labelCol"
      :wrapper-col="wrapperCol"
    >
      <a-form-item v-if="isUpdateForm" style="display: none">
        <a-input v-decorator="['id']" />
      </a-form-item>
      <a-form-item label="流转卡号">
        <a-input v-decorator="['flowCardNumber']" placeholder="流转卡号" />
      </a-form-item>
      <a-form-item label="工序序号">
        <a-input v-decorator="['processSequence']" placeholder="工序序号" />
      </a-form-item>
      <a-form-item label="工序编码">
        <a-input v-decorator="['processCode']" placeholder="工序编码" />
      </a-form-item>
      <a-form-item label="工序名称">
        <a-input v-decorator="['processName']" placeholder="工序名称" />
      </a-form-item>
      <a-form-item label="准备工时">
        <a-input v-decorator="['setupTime']" placeholder="准备工时" />
      </a-form-item>
      <a-form-item label="标准工时">
        <a-input v-decorator="['standardTime']" placeholder="标准工时" />
      </a-form-item>
      <a-form-item label="总数量">
        <a-input v-decorator="['totalQuantity']" placeholder="总数量" />
      </a-form-item>
      <a-form-item label="完工数量">
        <a-input v-decorator="['completedQuantity']" placeholder="完工数量" />
      </a-form-item>
      <a-form-item label="报废数量">
        <a-input v-decorator="['scrappedQuantity']" placeholder="报废数量" />
      </a-form-item>
      <a-form-item label="状态">
        <a-input v-decorator="['status']" placeholder="状态" />
      </a-form-item>
    </a-form>
  </a-modal>
</template>

<script>
import { PopUpFormMixin } from '@/mixins'
import { addObj, putObj } from '@/api/ProductionProcesses/t-process-info'

export default {
  name: 'TProcessInfoModalForm',
  mixins: [PopUpFormMixin],
  data () {
    return {
      reqFunctions: {
        create: addObj,
        update: putObj
      },

      labelCol: {
        sm: { span: 24 },
        md: { span: 5 }
      },
      wrapperCol: {
        sm: { span: 24 },
        md: { span: 19 }
      },

      // 校验配置
      decoratorOptions: {}
    }
  },
  methods: {}
}
</script>